import { request } from '@umijs/max';
export async function List() {
  return request('/menu/treeList', {
    method: 'get',
  });
}
export async function Save(data: any, options?: { [key: string]: any }) {
  return request('/menu/save', {
    method: 'POST',
    data,
    ...(options || {}),
  });
}
export async function Update(data: any, options?: { [key: string]: any }) {
  return request('/menu/update', {
    method: 'POST',
    data,
    ...(options || {}),
  });
}
export async function Delete(data: any, options?: { [key: string]: any }) {
  return request(`/menu/delete/${data.id}`, {
    method: 'POST',
    ...(options || {}),
  });
}
